package com.intellagric.controller.portal.traceability.trace_table;

import com.intellagric.common.pojo.LayuiDataGridResult;
import com.intellagric.common.pojo.ResponseMessage;
import com.intellagric.pojo.TraceTable;
import com.intellagric.service.traceability.trace_record_table.TraceTableService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.UUID;

/**
 * @Author: zhy
 * @email: 1269679946@qq.com
 * @Date: 2019/2/22
 * @DESC： 表的数据操作
 */
@Controller
public class TraceTableController {

    @Autowired
    private TraceTableService traceTableService;


    /**
     * 查询记录表格信息
     * @return Object
     */
    @RequestMapping("/tracetable/selectone")
    @ResponseBody
    public LayuiDataGridResult get(String id,String tableName) {
        return traceTableService.selectOneTraceTable(id, tableName);
    }

    /**
     * 查询记录表格信息
     * @return Object
     */
    @RequestMapping("/tracetable/select")
    @ResponseBody
    public LayuiDataGridResult get(int page,int limit,String tableName,String produceBatchId,String processId) {
        return traceTableService.selectTraceTable(page,limit,tableName,produceBatchId,processId);
    }

    /**
     * 查询记录表格树信息
     * @return LayuiDataGridResult
     */
    @RequestMapping("/tracetable/tree")
    @ResponseBody
    public LayuiDataGridResult getTree() {
        return null;
    }

    /**
     * 查询记录表格信息列表
     * @return LayuiDataGridResult
     */
    @RequestMapping("/tracetable/list")
    @ResponseBody
    public LayuiDataGridResult getList() {
        return null;
    }

    /**
     * 分页查询记录表格信息列表
     * @return LayuiDataGridResult
     */
    @RequestMapping("/tracetable/page")
    @ResponseBody
    public LayuiDataGridResult getPage() {
        return null;
    }

}
